package com.eu.ebpm.engine.pvm;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.eu.ebpm.engine.cmd.pvm.LaneAfterIntoCommand;
import com.eu.ebpm.engine.entity.deploy.Mission;
import com.eu.ebpm.engine.entity.deploy.Transfer;
import com.eu.ebpm.engine.entity.runtime.TaskEntity;

/**
 * 
 * 类名称: LaneAfterService
 * 类描述:  
 * @author 王晓华
 * @since 2015-1-24 下午11:34:35
 * @version v1.0
 */
@Component
public class LaneAfterService extends PvmEngine implements EngineService {

	@Autowired
	private LaneAfterIntoCommand laneAfterIntoCommand;
	
	public void into(Mission mission, TaskEntity task, Map<String, Object> variables) {
		
		Transfer nextTransfer = matchedNextTransfer(mission.getTransfers(), variables);
		
		laneAfterIntoCommand.execute(mission, task, nextTransfer);
		
		doDispatch(task, mission.getTransfers(), variables);
		
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	

	
	
}
